package arbor.mining.util.stock;

import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;

import org.apache.log4j.PropertyConfigurator;

import arbor.mining.util.UtilItem;
import arbor.mining.util.net.WebStringConn;

/**
 * StockDataTask is basic class to retrieve TW stock data.
 * @author doug
 *
 */
public class StockDataGather extends UtilItem{

	public static final int ELE1_ID = 1;
	public static final int FIN1_ID = 3;
	public static final int STX1_ID = 4;
	public static final int WTX0_ID = 5; /*台股大盤*/
	public static final int WTX1_ID = 6;	
	public static boolean GATHER_DEBUG = true;
	
	Properties urlProp = null;
	
	public StockDataGather() {
		super();
		setupURLProperties();
	}
	

	
    private void setupURLProperties() {
    	urlProp = new Properties();
	    try {
	    	urlProp.load(StockDataGather.class.getClassLoader()
		        .getResourceAsStream( "arbor/mining/util/stock/stock.properties"));
		    } catch (IOException e) {
		    	logger.error(e);
		    		
		    }	    		    
    }
	@Override
	public Properties getInitProperty() {
		Properties p = new Properties();
	    p.put("DEFAULT_URL_LIST", "stock.properties");
	    return p;
	}

}
